package org.acooly.secretbox.service.support;

import java.util.Comparator;

import org.acooly.secretbox.service.domain.FileObject;

public class FileObjectTypeComparator implements Comparator<FileObject> {

	@Override
	public int compare(FileObject object1, FileObject object2) {
		int type1 = object1.getType();
		int type2 = object2.getType();
		if (type1 > type2) {
			return -1;
		} else if (type1 < type2) {
			return 1;
		} else {
			return 0;
		}
	}

}
